package com.gestionabsences.beans;

/**
 *
 * @author matt
 */
public class WebUser {
    
    static public enum TypeUser {
        /**
	 *
	 */
	STRING_ONE("ETUDIANT"), STRING_TWO("ENSEIGNANT"), STRING_THREE("SECRETAIRE"), STRING_FOUR("ADMIN");
        
        private TypeUser(final String text) {
            this.text = text;
        }

        private final String text;
        
        @Override
        public String toString() {
            return text;
        }
    }
    
    private String login;
    private String passwordChecksum;
    private TypeUser type;
    private String mail;
    private String primary_key;
    private String affectation;
    private String nom;
    private String prenom;
    
    public WebUser(String login, String passwordChecksum, TypeUser type, String mail, String primary_key, String affectation, String nom, String prenom) {
        this.login = login;
        this.passwordChecksum = passwordChecksum;
        this.type = type;
	this.primary_key = primary_key;
	this.mail = mail;
	this.affectation = affectation;
	this.prenom = prenom;
	this.nom = nom;
    }
    
    public String getLogin() {
        return login;
    }
    
    public String getPasswordChecksum() {
        return passwordChecksum;
    }
    
    public TypeUser getType() {
        return type;
    }
    
    public String getTypeString() {
	return type.toString();
    }
    
    public String getEmail() {
	return mail;
    }
    
    public String getPrimaryKey() {
	return primary_key;
    }
    
    public String getAffectation() {
	return affectation;
    }
    
    public String getPrenom() {
	return prenom;
    }
    
    public String getNom() {
	return nom;
    }
    
    @Override
    public String toString() {
        return "login : " + login + "<br />passwordChecksum : " + passwordChecksum + "<br />type : " + type + "<br />mail : " + mail + "<br />nom : " + nom + "<br />prenom : " + prenom + "<br />primary key : " + primary_key + "<br />affectation : " + affectation;
    }
}
